package 简单的工厂模式.工厂模式demo.商场促销;

/**
 * @author zyl
 * @Description
 * @since 2023/12/26 10:46
 */

public class CashRebate extends CashSuper{

    private double moneyRebate  = 1d;

    public CashRebate(double moneyRebate) {
        this.moneyRebate = moneyRebate;
    }

    @Override
    public double acceptCash(double price, int num) {
        return price * num * this.moneyRebate;
    }
}
